package com.czk.test;

import com.czk.client.NettyClient;
import com.czk.domain.FileTransferProtocol;
import com.czk.utils.FileUtils;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;

import java.io.IOException;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/6/1 15:08
 */
public class Client {
    public static void main(String[] args) throws IOException {
        NettyClient client = new NettyClient();
        ChannelFuture channelFuture = client.start("localhost", 8080);
        FileTransferProtocol fileTransferProtocol = FileUtils.readFile("E:\\必特思维\\工作\\adi\\必特思维-应用数据集成系统adi2018-操作手册v20191025-1.docx");
        channelFuture.channel().writeAndFlush(fileTransferProtocol);
    }
}
